<<<<<<< HEAD:cxx/algorithm/src/defangIPaddr.cc
#include <string>
#include "defangIPaddr.h"
using namespace std;
string defangIPaddr(string address) {
        int n = address.length();
        for(int i=0;i<n;){
            if(address.at(i) == '.'&&i<n){
                address.replace(i,1,"[.]");
                i+=3;
                n+=2;
            }else
                i+=1;

        }
        return address;
    }
=======
#include "defangIPaddr.h"

#include <string>
using namespace std;
string defangIPaddr(string address) {
  int n = address.length();
  for (int i = 0; i < n;) {
    if (address.at(i) == '.' && i < n) {
      address.replace(i, 1, "[.]");
      i += 3;
      n += 2;
    } else
      i += 1;
  }
  return address;
}
>>>>>>> dev:cxx/algorithm/common/src/defangIPaddr.cc
